﻿<!--
(c) Copyright Fernando Cerqueira.
This source is subject to the Microsoft Public License (Ms-PL).
Please see http://go.microsoft.com/fwlink/?LinkID=131993 for details.
All other rights reserved.
-->

<dw:DialogWindow x:Class="WindowsPhoneCommands.UserSettingsDialog"
      xmlns:dw="clr-namespace:Microsoft.VisualStudio.PlatformUI;assembly=Microsoft.VisualStudio.Shell.10.0"
      xmlns:res="clr-namespace:WindowsPhoneCommands"
      xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
      xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
      xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
      xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
      mc:Ignorable="d" 
      WindowStyle="SingleBorderWindow"
      WindowStartupLocation="CenterOwner"
      ResizeMode="NoResize" 
      ShowInTaskbar="False"
      SizeToContent="WidthAndHeight"
      d:DesignHeight="600" d:DesignWidth="600">
    <Grid Width="411" Margin="10">
        <StackPanel Orientation="Vertical" HorizontalAlignment="Stretch" Margin="10">
            <TabControl Height="420">
                <TabItem Header="{Binding Source={x:Static res:Resources.XTabTitVsIntegration}}" Padding="10">
                    <StackPanel Margin="0,10,0,0">
                        <CheckBox x:Name="ChkCloseXde" Content="{Binding Source={x:Static res:Resources.XTabVsCloseXde}}" ></CheckBox>
                    </StackPanel>
                </TabItem>
                <TabItem Header="{Binding Source={x:Static res:Resources.XTabTransEngine}}" Padding="10">
                    <StackPanel Margin="0,10,0,0">
                        <StackPanel Orientation="Horizontal">
                            <TextBlock Text="{Binding Source={x:Static res:Resources.XPrefer}}" Margin="0,0,5,0" />
                            <RadioButton x:Name="OptGoogle" Content="Google" Margin="0,0,5,0" IsChecked="True" />
                            <RadioButton x:Name="OptBing" Content="Bing" Margin="5,0,0,0"/>
                        </StackPanel>
                        <GroupBox Header="{Binding Source={x:Static res:Resources.XSecurity}}" Margin="0,0,0,5">
                            <StackPanel>
                                <TextBlock Text="{Binding Source={x:Static res:Resources.XPwd1234}}"/>
                                <PasswordBox  Margin="0,0,0,3" Name="TxtPwd" x:FieldModifier="private" />
                                <CheckBox x:Name="ChkPromptPwd" Content="{Binding Source={x:Static res:Resources.XPromptTrans}}"/>
                                <StackPanel Orientation="Horizontal" Margin="0,5">
                                    <Button x:Name="BntVld" Content="{Binding Source={x:Static res:Resources.XValidate}}" Margin="0,0,5,0" Padding="3" Click="BntVldClick" />
                                    <Button x:Name="BntEncry" Content="{Binding Source={x:Static res:Resources.XEncrypt}}" Margin="0,0,5,0" Padding="3" IsEnabled="False" Click="BntEncryClick" />
                                    <Button x:Name="BntReset" Content="{Binding Source={x:Static res:Resources.XResetPassword}}" Margin="0,0,5,0" Padding="3" Click="BntResetClick" />
                                </StackPanel>
                            </StackPanel>
                        </GroupBox>
                        <GroupBox x:Name="BoxBing" Header="{Binding Source={x:Static res:Resources.XBingParam}}" Margin="0,0,0,5" IsEnabled="False">
                            <StackPanel>
                                <TextBlock Text="{Binding Source={x:Static res:Resources.XBingClientId}}"/>
                                <TextBox  x:Name="TxtBingClientId" Margin="0,0,0,5" LostFocus="TxtBingClientIdLostFocus" />
                                <TextBlock Text="{Binding Source={x:Static res:Resources.XBingCode}}"/>
                                <TextBox x:Name="TxtBingSecret" Margin="0,0,0,5" TextChanged="TxtBingSecretTextChanged" />
                            </StackPanel>
                        </GroupBox>
                        <GroupBox x:Name="BoxGoogle" Header="{Binding Source={x:Static res:Resources.XGoogleParam}}" Margin="0,0,0,5" IsEnabled="False">
                            <StackPanel>
                                <TextBlock Text="{Binding Source={x:Static res:Resources.XGoogleUrl}}"/>
                                <TextBox x:Name="TxtGoogleUrl" Margin="0,0,0,5" LostFocus="TxtGoogleUrlLostFocus" />
                                <TextBlock Text="{Binding Source={x:Static res:Resources.XGoogleFieldName}}"/>
                                <TextBox x:Name="TxtGoogleFindField" Margin="0,0,0,5" LostFocus="TxtGoogleFindFieldLostFocus" />
                            </StackPanel>
                        </GroupBox>
                    </StackPanel>
                </TabItem>
                <TabItem Header="{Binding Source={x:Static res:Resources.XTabNetWork}}" Padding="10">
                    <StackPanel>
                        <CheckBox x:Name="ChkDefaultCred" Content="{Binding Source={x:Static res:Resources.XNetDefCred}}" Margin="0,10,0,10" IsChecked="True" Click="ChkDefaultCredClick" />
                        <TextBlock Text="{Binding Source={x:Static res:Resources.XNetAdressPort}}"/>
                        <TextBox x:Name="TxtServerPort" Margin="0,0,0,10" IsEnabled="False" LostFocus="TxtServerPortLostFocus" />
                        <TextBlock Text="{Binding Source={x:Static res:Resources.XNetDomain}}"/>
                        <TextBox  x:Name="TxtDomain" Margin="0,0,0,10" IsEnabled="False" LostFocus="TxtDomainLostFocus" />
                        <TextBlock Text="{Binding Source={x:Static res:Resources.XNetUserName}}"/>
                        <TextBox  x:Name="TxtUser" Margin="0,0,0,10" IsEnabled="False" LostFocus="TxtUserLostFocus" />
                        <TextBlock Text="{Binding Source={x:Static res:Resources.XNetPassword}}"/>
                        <PasswordBox  x:Name="TxtPwdProxy" Margin="0,0,0,10" IsEnabled="False" LostFocus="TxtPwdProxyLostFocus" />
                        <Button x:Name="BntTestConn" Content="{Binding Source={x:Static res:Resources.XNetTest}}" Margin="0,0,5,0" Padding="3" HorizontalAlignment="Left" Click="BntTestConnClick" />
                    </StackPanel>
                </TabItem>
            </TabControl>
            <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="0,10,0,0">
                <Button Content="{Binding Source={x:Static res:Resources.XUserSave}}" Padding="5" Margin="0,0,10,0" Click="BntOkClick" />
            </StackPanel>
        </StackPanel>
    </Grid>
</dw:DialogWindow>

